package lifecycle;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class UserServiceImplLifecycle2
        implements InitializingBean, DisposableBean {

    public UserServiceImplLifecycle2() {
        System.out.println("构造函数----");
    }

   /* public void init(){
        System.out.println("init in lifecycle--");
    }

    public void init2(){

        System.out.println("init2 in lifecycle--");
    }

    public void destroy(){
        System.out.println("destroy in lifecycle---");
    }*/


    @Override
    public void destroy() throws Exception {
        System.out.println("disposalbe bean destroy**");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("after prop set***");
    }
}

